package lk.icta.core.entity;

import lk.icta.common.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * @author Supun Viraj Rathnayaka
 */

@Entity
@Table(schema = "ELAND_RAIL")
@NamedQueries({
        @NamedQuery(
                name = "getAllTaxData",
                query = "SELECT t FROM Taxation t"
        ),
        @NamedQuery(
                name = "getLastTaxation",
                query = "SELECT T FROM Taxation T ORDER BY T.id DESC"
        )
})
public class Taxation extends BaseEntity {

    @Column(nullable = false)
    private double taxPercentage;

    @Column(nullable = false)
    @Temporal(value = TemporalType.DATE)
    private java.util.Date startDate;

    @Column(nullable = true)
    @Temporal(value = TemporalType.DATE)
    private java.util.Date endDate;

    public double getTaxPercentage() {
        return taxPercentage;
    }

    public void setTaxPercentage(double taxPercentage) {
        this.taxPercentage = taxPercentage;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
}
